package com.settlement.system.service.impl;

import com.settlement.system.mapper.BaseMapper;
import com.settlement.system.mapper.TblWpCheckOutConfigMapper;
import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblWpCheckOutConfig;
import com.settlement.system.service.ITblWpCheckOutConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * WP-核查结果配置 服务实现类
 * @author xiaochuan
 * @since 2022-07-29
 */
@Slf4j
@Service
public class TblWpCheckOutConfigServiceImpl extends BaseServiceImpl implements ITblWpCheckOutConfigService {

    @Resource
    private TblWpCheckOutConfigMapper tblWpCheckOutConfigMapper;

    @Override
    public BaseMapper init() {
        return tblWpCheckOutConfigMapper;
    }

    @Override
    public List<TblWpCheckOutConfig> selectByParams(TblWpCheckOutConfig tblWpCheckOutConfig) throws ServiceException {
        try {
            return tblWpCheckOutConfigMapper.selectByParams(tblWpCheckOutConfig);
        } catch (Exception ex){
            log.error("selectByParams by tblWpCheckOutConfig happen exception",ex);
            throw new ServiceException("selectByParams by tblWpCheckOutConfig happen exception",ex);
        }
    }
}

